package com.link.database.service.impl;

import com.link.database.dao.DBCharacterDao;
import com.link.database.entity.DBCharacter;
import com.link.database.service.DBCharacterService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DBCharacterServiceImpl implements DBCharacterService {
    
    @Resource
    private DBCharacterDao characterDao;
    
    @Override
    public DBCharacter findById(long id) {
        return characterDao.findById(id);
    }
    
    @Override
    public List<DBCharacter> findByAccountId(long accountId) {
        return characterDao.findByAccountId(accountId);
    }
    
    @Override
    public DBCharacter findByName(String name) {
        return characterDao.findByName(name);
    }
    
    @Override
    public void insert(DBCharacter character) {
        characterDao.insert(character);
    }
    
    @Override
    public void update(DBCharacter character) {
        characterDao.update(character);
    }
    
    @Override
    public void delete(long id) {
        characterDao.delete(id);
    }

}